The present invention relates to a technique of manipulating image data in which the image data is scrambled by the use of a computer and restored to the original image data by removing the scramble from the image data, or in particular to an image data manipulating method suitable for combining a plurality of types of image data manipulation and also for manipulating image data with a small amount of processing, and a recording medium for recording a processing program of such an operation.
One of the image data formats handled by computer is JPEG (Joint Photographic Coding Expert Group) which finds wide applications. The JPEG format is described, for example, in xe2x80x9cJPEG still image data compression standardxe2x80x9d, by William B. Pennebaker, and Joan L. Mtchell, pp.97-134. There are several types of JPEG formats, of which JFIF (JPEG File Interchange Format) is most widely used.
In JFIF, the YCbCr color coordinate system is used for expression of a color image, in which the color of each pixel is expressed by the luminance component (Y), the difference between luminance and blue level (Cb) and the difference between luminance and red level (Cr). Each component has 256 gradations per pixel.
Also, in JFIF, an image is segmented into rectangular areas each having a predetermined number of pixels in vertical and horizontal directions, each rectangular area is subjected to discrete cosine transform (hereinafter referred to as DCT), and the image is expressed by the DCT coefficient obtained as the result of DCT. These rectangular areas are called blocks. In JFIF, the basic size of a block is assumed to contain eight pixels in each of vertical and horizontal directions. The DCT coefficient corresponding to this block assumes a value representing eight rows and eight columns. One DC component value and 63 AC component values are obtained for each element of each block.
The DC component value indicates a value constituting a reference of each of a luminance component value and a color component value of each block, while the AC component value indicates the degree of change in the block with respect to the reference value.
Further, for each value (DC component value and AC component value), information is reduced by quantization using a quantization table. Specifically, the quantization table is a table as large as the DCT coefficient, and the quantization is effected by dividing the value of a DCT coefficient by a corresponding value in the quantization table.
Information for each DC component value and each AC component value is also reduced by removing some sampling pixels, run-length compression and Huffman coding, which are not directly related to the present invention and will not be described.
The blocks are managed sequentially. In JFIF, the DC component value of each block may be expressed not by a real value but by the difference of the DC component value with that of an adjoining block. Specifically, the DC component value of a given block is expressed by the difference of the DC component value thereof with an adjoining block. This utilizes the image data characteristic that the luminance component values and the color component values of adjoining images are often analogous to each other. The information is reduced in this way.
A conventional method in which an image is changed (scrambled) by computer processing is described, for example, in JP-A-10-108180. In this technique, the image can be scramble to obtain xe2x80x9ca monochromatic image unchanged from the original imagexe2x80x9d, xe2x80x9can image having blurred detailsxe2x80x9d or xe2x80x9can image of inserted data superposed on the original imagexe2x80x9d. Also, an image scrambled can be restored to the original image by decoding.
This image scrambling process in which the image data is changed in advance and the original image is obtained only through a regular procedure has come to be used for the purpose of protecting the copyright of image data.
As for the image data manipulation, one practice is to bury information in the image data by use of the electronic watermarking technique. The electronic water-marking is performed by manipulating predetermined information of the image data like the image scramble, and therefore may not be used in combination in the case where the information to be manipulated for change are overlapped between the two techniques, and also in the arts of JP-A-10-108180.
The problem of the prior art to be solved is the fact that the combined use of the electronic watermarking and the image scramble is impossible in the case where the information to be manipulated is overlapped in manipulating image data and the fact that the processing amount is increased as the image is scrambled over the whole area of the image.
The object of the present invention is to solve the problems of the prior art and to provide an image data manipulation method capable of sophisticated, fast image data manipulation with a combination of plural types of image data manipulation processes and a recording medium for recording a processing program thereof.
In order to achieve the object described above, according to the present invention, there is provided an image data manipulation method using a computer having a central processing unit and a storage unit, wherein an image is segmented into a plurality of blocks each having a predetermined number of pixels along each of vertical and horizontal directions and thus converted into image data having luminance information and color information thereby to scramble the image data, the method comprising the steps of:
reading a designated block from the image data stored in a storage unit;
changing at least one of the luminance information and the color information of each block thus read out, by the central processing unit; and
attaching the ID information for identifying the block thus scrambled to the image data including the particular block thereby to control the manner in which the image data are displayed for each block.
In the case where the image data are transformed by the discrete cosine transform (DCT) of the pixel value of a block, for example, the DC component value of the luminance information and the color information of the DCT result for each block. In such a case, a predetermined bit value of the DC component of each block is used as ID information. A scramble is indicated, for example, by setting the least significant bit to xe2x80x9c1xe2x80x9d. Alternatively, whether a particular block has been scrambled or not is indicated by the header information of a data format.
As described above, the manner in which image data is displayed is changed for each block, and therefore the area for which the manner of display is changed can be limited to specified blocks, thereby reducing the amount of manipulation for scramble. At the same time, since the information to be changed is limited, other image data manipulation techniques such as the electronic watermarking can be used in combination.
The blocks specified as scramble blocks by the ID information are transformed to restore the image data by a procedure reverse to the scramble.
Further, in the case where the display conditions fail to be met in the procedure for restoring the image data after verification and checking of the display conditions, either the image data are displayed without being restored or nothing is displayed. In this way, the manipulator can easily determine by watching the image on display whether the display conditions have been correctly verified or not.
According to the invention, the image can be scrambled for each block, and therefore the electronic watermark can be buried in the image portions not scrambled. Also, the processing amount can be reduced as compared with the case in which the whole area of the image is scrambled. Thus, a sophisticated, fast image data manipulation is possible with a plurality of types of image data manipulation processes combined.